var Cell = Class.create();
Cell.prototype = {
	CELL_PIXEL : 16,
	num : 0,
	_isEmpty : true,
	
	initialize : function() {
		this._isEmpty = true;
	},
	
	setCell : function(num) {
		this._isEmpty = false;
		this.num = num;
	},
	
	getColor : function() {
		return this.num;
	},
	
	resetCell : function() {
		this._isEmpty = true;
	},
	
	isEmpty : function() {
		return this._isEmpty;
	},
	
	draw : function(ctx, img, x, y) {
		if (this._isEmpty) {
			return;
		}
		
		ctx.drawImage(img,
			0, this.num * this.CELL_PIXEL,
			this.CELL_PIXEL, this.CELL_PIXEL,
			x * this.CELL_PIXEL, y * this.CELL_PIXEL,
			this.CELL_PIXEL, this.CELL_PIXEL);
	}
};